home *** CD-ROM | disk | FTP | other *** search
- UNIT AboutDialog;
-
- {File name:AboutDialog.Pas }
- {Function: Handle a dialog}
- {History: 12/19/88 Original by Prototyper. }
- { Modified 1/6/89 }
-
- INTERFACE
-
-
- PROCEDURE D_AboutDialog;
-
- IMPLEMENTATION
-
- CONST {These are the item numbers for controls in the Dialog}
- I_OK = 1;
-
- VAR
- ExitDialog : boolean; {Flag used to exit the Dialog}
- PROCEDURE D_AboutDialog;
- VAR
- GetSelection : DialogPtr; {Name of dialog}
- itemHit : Integer; {Get selection}
-
- BEGIN {Start of dialog handler}
- GetSelection := GetNewDialog(2, NIL, Pointer(-1)); {Bring in the dialog resource}
- ShowWindow(GetSelection); {Open a dialog box}
- SelectWindow(GetSelection); {Lets see it}
- SetPort(GetSelection); {Perpare to add conditional text}
-
- ExitDialog := FALSE; {Do not exit dialog handle loop yet}
-
- REPEAT {Start of dialog handle loop}
- ModalDialog(NIL, itemHit); {Wait until an item is hit}
- {Handle it real time}
- IF (ItemHit = I_OK) THEN {Handle the Button being pressed}
- BEGIN
- ExitDialog := TRUE; {Exit the dialog when this selection is made}
- END; {End for this item selected}
-
-
- UNTIL ExitDialog; {Handle dialog items until exit selected}
-
- DisposDialog(GetSelection); {Flush the dialog out of memory}
-
- END; {End of procedure}
-
- END. {End of unit}